﻿using BCEntity.Sim.Admin.AdminSpecificPermissionRecord;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Sim.Admin.AdminSpecificPermissionRecord
{
    /// <summary>
    /// 管理员特殊权限记录
    /// </summary>
    public interface IAdminSpecificPermissionRecordData
    {
        /// <summary>
        /// 检查权限记录是否存在
        /// </summary>
        /// <param name="adminExtensionPermissionRecordId">管理员特殊权限记录Id</param>
        /// <returns></returns>
        Task<bool> CheckExists(int adminExtensionPermissionRecordId);
        /// <summary>
        /// 检查权限记录是否存在
        /// </summary>
        /// <param name="adminId">管理员Id</param>
        /// <param name="extensionPermissionKey">特殊权限Key</param>
        /// <returns></returns>
        Task<bool> CheckExists(long adminId, string extensionPermissionKey);

        /// <summary>
        /// 添加管理员特殊权限记录
        /// </summary>
        /// <param name="adminExtensionPermissionRecordEntity">管理员特殊权限记录</param>
        /// <returns></returns>
        Task<AdminSpecificPermissionRecordEntity> Add(AdminSpecificPermissionRecordEntity adminExtensionPermissionRecordEntity);
        /// <summary>
        /// 删除管理员特殊权限记录
        /// </summary>
        /// <param name="AdminSpecificPermissionRecordId">管理员特殊权限记录Id</param>
        /// <returns></returns>
        void Delete(int adminExtensionPermissionRecordId);
        /// <summary>
        /// 删除管理员特殊权限记录
        /// </summary>
        /// <param name="adminId">管理员Id</param>
        /// <param name="extensionPermissionKey">特殊权限Key</param>
        /// <returns></returns>
        void Delete(long adminId, string extensionPermissionKey);
        /// <summary>
        /// 获取管理员特殊权限记录
        /// </summary>
        /// <param name="adminId">管理员Id</param>
        /// <returns></returns>
        Task<IEnumerable<AdminSpecificPermissionRecordEntity>> Query(long adminId);


    }
}
